export const hebing = function (list) {
  if (list.length > 0) {
    let newdata = [];

    for (let k in list) {
      newdata.push({
        ...list[k],
        KEY: list[k].no + list[k].title,
      });
    }
    //
    let result = [];
    let map = {};
    for (let k = 0; k < newdata.length; k++) {
      if (!map[newdata[k].KEY]) {
        result.push({
          ...newdata[k],
          COUNT: 1,
        });
        map[newdata[k].KEY] = newdata[k];
      } else {
        for (let j = 0; j < result.length; j++) {
          if (result[j].KEY == newdata[k].KEY) {
            result[j].COUNT++;
            break;
          }
        }
      }
    }
    return result;
  }
};
